Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement for shared library build #10

Merged
merged 1 commit into from
Nov 24, 2017
Merged

Conversation

ribtoks
Copy link
Contributor

@ribtoks ribtoks commented Jan 16, 2017

This pull request provides correct export symbols definition for usage mman as shared dll in C++ projects as well as Qt project file for qmake build system (along with CMakeLists and MSVS project)

@guruofquality
Copy link

I ended up disabling the shared build, but I saw this pull and I thought I would comment:

  • I like the exports macro but the the cmakelists should also use set_target_properties(mman PROPERTIES DEFINE_SYMBOL "MMAN_LIBRARY") to define MMAN_LIBRARY (and to enable export) when building the library.
  • Secondly there should be a way to define an empty MMANSHARED_EXPORT when building a static library. From other examples I have seen one might define MMAN_DLL when both building and using a dll. This would require additional ifdefs for MMANSHARED_EXPORT and would also require CMakeLists to add_definitions(-DMMAN_DLL) when BUILD_SHARED_LIBS is true.
  • For reference this is a pretty good example (ignore the gcc part, see #ifdef FOX_DLL) https://gcc.gnu.org/wiki/Visibility

@witwall witwall merged commit f5ff813 into alitrack:master Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants